package com.yuanrui.subject.domain.convert;

import com.yuanrui.subject.domain.entity.SubjectInfoBO;
import com.yuanrui.subject.domain.entity.SubjectOptionBO;
import com.yuanrui.subject.infra.basic.entity.SubjectInfo;
import com.yuanrui.subject.infra.basic.entity.SubjectInfoEs;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 题目标签表(SubjectLabel)转换器
 */
@Mapper
public interface SubjectInfoConvert {
    SubjectInfoConvert INSTANCE = Mappers.getMapper(SubjectInfoConvert.class);

    //BO转Entity
    SubjectInfo convertToInfoEntity(SubjectInfoBO subjectInfoBO);

    //Entity转BO
    SubjectInfoBO convertToInfoBo(SubjectInfo subjectInfo);

    List<SubjectInfoBO> convertToInfoBoList(List<SubjectInfo> subjectInfoList);

    //Option和Info转BO
    SubjectInfoBO convertOptionAndInfoToBo(SubjectOptionBO subjectOptionBO, SubjectInfo subjectInfo);

    //BO转EsEntity
    SubjectInfoEs convertToEsEntity(SubjectInfoBO subjectInfoBO);


}
